]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Set offscreen redirect on window previews
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 13 Nov 2018 16:24:37 +0000 (17:24 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 10 Jul 2019 21:41:58 +0000 (21:41 +0000)
Window previews are sometimes shown translucent, for example during
drags or animations. They can also have attached dialogs, in which
case the opacity should affect the combination of all windows instead
of being applied to each window individually, blended together, so
make sure they are redirected as a whole when necessary.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/774

js/ui/workspace.js

index 868f91bc949ec6167d2de15583cb64ca5dc8ed00..4c2cbf06469d97f13bc1f9e93a1e7951d4562003 100644 (file)
@@ -130,6 +130,8 @@ var WindowClone = GObject.registerClass({
             layout_manager: new WindowCloneLayout()
         });
 
+        this.set_offscreen_redirect(Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY);
+
         this.add_child(this._windowClone);
 
         this._delegate = this;
@@ -184,6 +186,10 @@ var WindowClone = GObject.registerClass({
         this._closeRequested = false;
     }
 
+    vfunc_has_overlaps() {
+        return this.hasAttachedDialogs();
+    }
+
     set slot(slot) {
         this._slot = slot;
     }